from typing import List

from base.http import Request, Response


class Goods:
    def goods_list(self, token, keyword, page=1, limit=10) -> Response:
        request = Request()
        request.path = '/wx/goods/list'
        request.method = 'get'
        request.headers["X-Litemall-Token"] = token
        request.data = {
            'keyword': keyword,
            'page': page,
            'limit': limit
        }
        r = request.send()
        print(r.json())
        return r

    def goods_detail(self, token, id) -> Response:
        request = Request()
        request.path = '/wx/goods/detail'
        request.method = 'get'
        request.headers["X-Litemall-Token"] = token
        request.query = {
            'id': id
        }
        r = request.send()
        return r

if __name__ == "__main__":
    pass
